// 日常管理相关接口
import request from '@/utils/request.js'


// 日常管理-生长发育，导出-生长发育记录
export const reqDonwLoadFile = () => {
    return request({
        url: '/growth/download',
        method: 'get',
        responseType: 'blob'
    })
}

// 日常管理-生长发育，上传-生长发育记录
export const reqCowGrowthUploadRecordList = (data) => {
    return request({
        url: '/cow-growth/upload-record-list',
        method: 'post',
        data
    })
}

// 日常管理-生长发育，保存-生长发育记录表单
export const reqCowGrowthSaveRecordList = (data) => {
    return request({
        url: '/cow-growth/save-record-list',
        method: 'post',
        data
    })
}

// 日常管理-生长发育，分页查询
export const reqGetCowGrowthPage = (params) => {
    return request({
        url: '/cow-growth/page',
        method: 'get',
        params
    })
}

// 日常管理-生长发育，删除某一行
export const reqCowGrowthDelete = (params) => {
    return request({
        url: '/cow-growth/delete',
        method: 'get',
        params
    })
}

// 日常管理-生长发育，通过id获取牛详情
export const reqGetCowGrowthInfo = (params) => {
    return request({
        url: '/cow-growth/info',
        method: 'get',
        params
    })
}

// 日常管理-生长发育，编辑后保存
export const reqCowGrowthUpdata = (data) => {
    return request({
        url: '/cow-growth/update',
        method: 'post',
        data
    })
}

// 日常管理-dhi取样，获取列表
export const reqGetCowDhiPage = (params) => {
    return request({
        url: '/cow-dhi/page',
        method: 'get',
        params
    })
}

// 日常管理-dhi取样，导入，记录列表
export const reqUploadRecordList = (data) => {
    return request({
        url: '/cow-dhi/upload-record-list',
        method: 'post',
        data
    })
}

// 日常管理-dhi取样，保存-记录列表
export const reqSaveRecordList = (data) => {
    return request({
        url: '/cow-dhi/save-record-list',
        method: 'post',
        data
    })
}

// 日常管理-产奶记录，分页查询
export const reqGetCowMilkPage = (params) => {
    return request({
        url: '/cow-milk/page',
        method: 'get',
        params
    })
}

// 日常管理-产奶记录，导入-记录列表
export const reqCowMilkUploadRecordList = (data) => {
    return request({
        url: '/cow-milk/upload-record-list',
        method: 'post',
        data
    })
}

// 日常管理-产奶记录，保存-记录列表
export const reqCowMilkSaveRecordList = (data) => {
    return request({
        url: '/cow-milk/save-record-list',
        method: 'post',
        data
    })
}

// 日常管理-产奶记录，编辑，根据主键获取
export const reqGetCowMilkInfo = (params) => {
    return request({
        url: '/cow-milk/info',
        method: 'get',
        params
    })
}

// 日常管理-产奶记录，编辑，更新
export const reqGetCowMilkUpdate = (data) => {
    return request({
        url: '/cow-milk/update',
        method: 'post',
        data
    })
}

// 日常管理-产奶记录，删除某一行记录
export const reqGetCowMilkDelete = (params) => {
    return request({
        url: '/cow-milk/delete',
        method: 'get',
        params
    })
}

// 日常管理-屠宰性能，获取列表
export const reqGetCowSlaughterPage = (params) => {
    return request({
        url: '/cow-slaughter/page',
        method: 'get',
        params
    })
}

// 日常管理-屠宰性能，导入-记录列表
export const reqCowSlaughterUploadRecordList = (data) => {
    return request({
        url: '/cow-slaughter/upload-record-list',
        method: 'post',
        data
    })
}

// 日常管理-屠宰性能，保存-记录列表
export const reqCowSlaughterSaveRecordList = (data) => {
    return request({
        url: '/cow-slaughter/save-record-list',
        method: 'post',
        data
    })
}

// 日常管理-品种登记，分页查询
export const reqGetCowRegistrationPage = (params) => {
    return request({
        url: '/cow-registration/page',
        method: 'get',
        params
    })
}

// 日常管理-品种登记，新增，上传牛照片（左，右，正面照）
export const reqUploadImage = (data) => {
    return request({
        url: '/upload/image',
        method: 'post',
        data
    })
}

// 日常管理-品种登记，新增
export const reqCowRegistrationAdd = (data) => {
    return request({
        url: '/cow-registration/add',
        method: 'post',
        data
    })
}

// 日常管理-品种登记，编辑，通过 id 查详情
export const reqGetCowRegistrationInfo = (params) => {
    return request({
        url: '/cow-registration/info',
        method: 'get',
        params
    })
}

// 日常管理-品种登记，编辑，保存
export const reqCowRegistrationUpDate= (data) => {
    return request({
        url: '/cow-registration/update',
        method: 'post',
        data
    })
}

// 日常管理-品种登记，删除一条数据
export const reqCowRegistrationDelete= (params) => {
    return request({
        url: '/cow-registration/delete',
        method: 'get',
        params
    })
}

// 日常管理-发病记录，获取表格数据
export const reqGetCowDiseasePage = (params) => {
    return request({
        url: '/cow-disease/page',
        method: 'get',
        params
    })
}

// 日常管理-种公牛精液品质-新增or更新
export const reqGetSemenQualityAddOrUpdate = (data) => {
    return request({
        url: '/semen-quality/add-or-update',
        method: 'post',
        data
    })
}

// 日常管理-种公牛精液品质-分页查询
export const reqGetSemenQualityPage = (params) => {
    return request({
        url: '/semen-quality/page',
        method: 'get',
        params
    })
}

// 日常管理-种公牛精液品质-编辑，通过 id 查找详情
export const reqGetSemenQualityInfo = (params) => {
    return request({
        url: '/semen-quality/info',
        method: 'get',
        params
    })
}

// 日常管理-配种妊娠，分页查询
export const reqGetBreedingPregnancyPage = (params) => {
    return request({
        url: '/breeding-pregnancy/page',
        method: 'get',
        params
    })
}

// 日常管理-群体流动，分页查询
export const reqGetCowMovementPage = (params) => {
    return request({
        url: '/cow-movement/page',
        method: 'get',
        params
    })
}

// 日常管理-群体流动，通过id获取详情
export const reqGetCowMovementInfo = (params) => {
    return request({
        url: '/cow-movement/info',
        method: 'get',
        params
    })
}

// 日常管理-分娩产犊记录，获取列表
export const reqGetCowCalvePage = (params) => {
    return request({
        url: '/cow-calve/page',
        method: 'get',
        params
    })
}

// 日常管理-群体流动，上传记录列表
export const reqCowMovementUploadRecordList = (data) => {
    return request({
        url: '/cow-movement/upload-record-list',
        method: 'post',
        data
    })
}

// 日常管理-群体流动，保存记录列表
export const reqCowMovementSaveRecordList = (data) => {
    return request({
        url: '/cow-movement/save-record-list',
        method: 'post',
        data
    })
}